package com.yunji.runner;

import com.yunji.order.business.delay.RedissonQueue;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.CommandLineRunner;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

/**
 * @Project: yunji-coffee
 * @Package: com.yunji.runner
 * @Title: QueueConsumer
 * @Description: 队列启动器
 * <p>
 * History:
 * Date						Version			Author			Summary
 * ========================================================================
 * 2024-04-20 16:55:03		V1.0			HuaAo		新建类
 */
@Component
public class QueueConsumer implements CommandLineRunner {
    private static final Logger logs = LoggerFactory.getLogger(QueueConsumer.class);

    @Resource
    private RedissonQueue redissonQueue;

    @Override
    public void run(String... args) {
        logs.info("队列启动器加载开始");
        redissonQueue.start();
        logs.info("队列启动器开始完成");
    }
}